home *** CD-ROM | disk | FTP | other *** search
/ Java Internet Programming Reference Guide / Java Internet Programming Reference Guide.iso / autorun / java.dir / 00121_cans.txt < prev    next >
Encoding:
Text File  |  1996-01-12  |  8.5 KB  |  566 lines

  1. Properties
  2.  
  3.  
  4.  
  5. The following properties are available in JavaScript: 
  6. action alinkColor anchors bgColor checked current defaultChecked defaultSelected defaultStatus defaultValue E elements fgColor      forms frames hash host hostname href index lastModified length linkColor links LN2 LN10      loadedDate location method name options parent pathname PI port protocol referrer search selected      selectedIndex self SQRT1_2 SQRT2 status target text title top value vlinkColor window 
  7.  
  8.  
  9. ----------------------------------------------------------
  10.  
  11.  
  12. action property
  13.  
  14.  
  15.  
  16. String value of a FORM tag's ACTION attribute. 
  17.  
  18.  
  19.  
  20. Applies to
  21.  
  22.  
  23.  
  24. form 
  25.  
  26. Examples
  27.  
  28.  
  29.  
  30. xxx Examples to be supplied. 
  31. ----------------------------------------------------------
  32.  
  33.  
  34. alinkColor property
  35.  
  36.  
  37.  
  38. RGB value for color of activated links (after mouse-button down, but before mouse-button up), expressed as a hexadecimal triplet. This property is the JavaScript reflection of the ALINK attribute of the HTML BODY tag. 
  39.  
  40.  
  41.  
  42. Applies to
  43.  
  44.  
  45.  
  46. document 
  47.  
  48. Examples
  49.  
  50.  
  51.  
  52. xxx Examples to be supplied. 
  53. ----------------------------------------------------------
  54.  
  55.  
  56. anchors property
  57.  
  58.  
  59.  
  60. Array of objects corresponding to named anchors (<A NAME="">/TT> tags) in source order. 
  61.  
  62. The anchors array contains an entry for each anchor in a document. For example, if a document contains three anchors, these anchors are reflected as document.anchors[0], document.anchors[1], and document.anchors[2]. 
  63.  
  64. To obtain the number of anchors in a document, use the length property: document.anchors.length. 
  65.  
  66.  
  67.  
  68. Applies to
  69.  
  70.  
  71.  
  72. document 
  73.  
  74. Examples
  75.  
  76.  
  77.  
  78. xxx Examples to be supplied. 
  79.  
  80. See also
  81.  
  82. length property 
  83. ----------------------------------------------------------
  84.  
  85.  
  86. bgColor property
  87.  
  88.  
  89.  
  90. RGB value of background color, expressed as a hexadecimal triplet. This property is the JavaScript reflection of the BGCOLOR attribute of the HTML BODY tag. 
  91.  
  92.  
  93.  
  94. Applies to
  95.  
  96.  
  97.  
  98. document 
  99.  
  100. Examples
  101.  
  102.  
  103.  
  104. xxx Examples to be supplied. 
  105. ----------------------------------------------------------
  106.  
  107.  
  108. checked property
  109.  
  110.  
  111.  
  112. For checkbox, Boolean, false if not checked, true if checked. For radioButton, Boolean, false if not pressed, true if pressed. 
  113.  
  114.  
  115.  
  116. Applies to
  117.  
  118.  
  119.  
  120. checkbox, radioButton 
  121.  
  122. Examples
  123.  
  124.  
  125.  
  126. xxx To be supplied. 
  127. ----------------------------------------------------------
  128.  
  129.  
  130. current property
  131.  
  132.  
  133.  
  134. URL of current page. xxx Not yet implemented in Beta 4. 
  135.  
  136.  
  137.  
  138. Applies to
  139.  
  140.  
  141.  
  142. history 
  143.  
  144. Examples
  145.  
  146.  
  147.  
  148. xxx Examples to be supplied. 
  149. ----------------------------------------------------------
  150.  
  151.  
  152. defaultChecked property
  153.  
  154.  
  155.  
  156. For checkbox, Boolean property that indicates if the element is selected by default, by the CHECKED attribute. For radioButton, Boolean property that indicates if the element is selected by default, by the CHECKED attribute. 
  157.  
  158.  
  159.  
  160. Applies to
  161.  
  162.  
  163.  
  164. checkbox, radioButton 
  165.  
  166. Examples
  167.  
  168.  
  169.  
  170. xxx Examples to be supplied. 
  171. ----------------------------------------------------------
  172.  
  173.  
  174. defaultSelected property
  175.  
  176.  
  177.  
  178. Boolean property that indicates if the option is selected by default, by the presence of the SELECTED attribute in the HTML OPTION tag. 
  179.  
  180.  
  181.  
  182. Applies to
  183.  
  184.  
  185.  
  186. selection 
  187.  
  188. Examples
  189.  
  190.  
  191.  
  192. xxx Examples to be supplied. 
  193. ----------------------------------------------------------
  194.  
  195.  
  196. defaultStatus property
  197.  
  198.  
  199.  
  200. For a window, the defaultStatus property reflects the default message displayed in the status bar at the bottom of the window. Do not confuse defaultStatus with status. The status property reflects a priority or transient message in the status bar, such as the message that appears when a mouseOver event occurs over an anchor. 
  201.  
  202.  
  203.  
  204. Applies to
  205.  
  206.  
  207.  
  208. window 
  209.  
  210. Examples
  211.  
  212.  
  213.  
  214. xxx Examples to be supplied. 
  215. ----------------------------------------------------------
  216.  
  217.  
  218. defaultValue property
  219.  
  220.  
  221.  
  222. For text and textArea, string, the initial contents of the field. 
  223.  
  224.  
  225.  
  226. Applies to
  227.  
  228.  
  229.  
  230. password, text, textArea 
  231.  
  232. Examples
  233.  
  234.  
  235.  
  236. xxx Examples to be supplied. 
  237. ----------------------------------------------------------
  238.  
  239.  
  240. E property
  241.  
  242.  
  243.  
  244. E is Euler's constant, the base of natural logarithms, roughly 2.718. 
  245.  
  246.  
  247.  
  248. Applies to
  249.  
  250.  
  251.  
  252. Math 
  253.  
  254. Examples
  255.  
  256.  
  257.  
  258. xxx Examples to be supplied. 
  259. ----------------------------------------------------------
  260.  
  261.  
  262. elements property (client)
  263.  
  264. Array of objects corresponding to form elements (such as checkbox, radioButton, and text objects) in source order. 
  265.  
  266. The elements array contains an entry for each object in a form. For example, if a form has a text field, a radio button group, and a checkbox, these elements are reflected as formName.elements[0], formName.elements[1], and formName.elements[2]. 
  267.  
  268.  
  269.  
  270. Applies to
  271.  
  272.  
  273.  
  274. form 
  275.  
  276. Examples
  277.  
  278.  
  279.  
  280. xxx Examples to be supplied. 
  281. ----------------------------------------------------------
  282.  
  283.  
  284. fgColor property
  285.  
  286.  
  287.  
  288. RGB value of foreground (text) color, expressed as a hexadecimal triplet. This property is the JavaScript reflection of the FGCOLOR attribute of the HTML BODY tag. 
  289.  
  290.  
  291.  
  292. Applies to
  293.  
  294.  
  295.  
  296. document 
  297.  
  298. Examples
  299.  
  300.  
  301.  
  302. xxx Examples to be supplied. 
  303. ----------------------------------------------------------
  304.  
  305.  
  306. forms property
  307.  
  308.  
  309.  
  310. Array of objects corresponding to named forms (<FORM NAME="">/TT> tags) in source order. 
  311.  
  312. The forms array contains an entry for each form object in a document. For example, if a document contains three forms, these forms are reflected as document.forms[0], document.forms[1], and document.forms[2]. 
  313.  
  314. You can refer to a form's elements by using the forms array. For example, you would refer to a text object named quantity in the second form as: 
  315.  
  316.  
  317. document.forms[1].quantity
  318.  
  319.  
  320.  
  321. You would refer to the value property of this text object as: 
  322.  
  323.  
  324. document.forms[1].quantity.value
  325.  
  326.  
  327.  
  328.  
  329.  
  330. To obtain the number of forms in a document, use the length property: document.forms.length. 
  331.  
  332.  
  333.  
  334. Applies to
  335.  
  336.  
  337.  
  338. document 
  339.  
  340. Examples
  341.  
  342.  
  343.  
  344. xxx Examples to be supplied. 
  345.  
  346. See also
  347.  
  348. length property 
  349. ----------------------------------------------------------
  350.  
  351.  
  352. frames property
  353.  
  354.  
  355.  
  356. Array of objects corresponding to child frame windows (<FRAMESET>tag) in source order. 
  357.  
  358. The frames array contains an entry for each child frame in a window. For example, if a window contains three child frames, these frames are reflected as window.frames[0], window.frames[1], and window.frames[2]. 
  359.  
  360. To obtain the number of number of child frames in a window, use the length property: window.frames.length. 
  361.  
  362.  
  363.  
  364. Applies to
  365.  
  366.  
  367.  
  368. window 
  369.  
  370. Examples
  371.  
  372.  
  373.  
  374. xxx Examples to be supplied. 
  375.  
  376. See also
  377.  
  378. length property 
  379. ----------------------------------------------------------
  380.  
  381. hash property
  382.  
  383.  
  384.  
  385. The anchor name following the # symbol. 
  386.  
  387.  
  388.  
  389. Applies to
  390.  
  391.  
  392.  
  393. location 
  394.  
  395. Examples
  396.  
  397.  
  398.  
  399. xxx Examples to be supplied. 
  400. ----------------------------------------------------------
  401.  
  402. host property
  403.  
  404.  
  405.  
  406. The hostname:port part of the location or URL. 
  407.  
  408.  
  409.  
  410. Applies to
  411.  
  412.  
  413.  
  414. location 
  415.  
  416. Examples
  417.  
  418.  
  419.  
  420. xxx Examples to be supplied. 
  421.  
  422. See also
  423.  
  424. hostname 
  425. ----------------------------------------------------------
  426.  
  427.  
  428. hostname property
  429.  
  430.  
  431.  
  432. The hostname part of the location or URL. 
  433.  
  434.  
  435.  
  436. Applies to
  437.  
  438.  
  439.  
  440. location 
  441.  
  442. Examples
  443.  
  444.  
  445.  
  446. xxx Examples to be supplied. 
  447.  
  448. See also
  449.  
  450. host 
  451. ----------------------------------------------------------
  452.  
  453.  
  454. href property
  455.  
  456.  
  457.  
  458. The entire URL as a JavaScript string. 
  459.  
  460.  
  461.  
  462. Applies to
  463.  
  464.  
  465.  
  466. location 
  467.  
  468. Examples
  469.  
  470.  
  471.  
  472. xxx Examples to be supplied. 
  473. ----------------------------------------------------------
  474.  
  475.  
  476. index property
  477.  
  478.  
  479.  
  480. For radioButton, number, the ordinal number of the radioButton field, 0-based. For a select object option, the number identifying the position of the option in the selection, starting from zero. 
  481.  
  482.  
  483.  
  484. Applies to
  485.  
  486.  
  487.  
  488. radioButton, selection 
  489.  
  490. Examples
  491.  
  492.  
  493.  
  494. xxx Examples to be supplied. 
  495. ----------------------------------------------------------
  496.  
  497.  
  498. lastModified property
  499.  
  500.  
  501.  
  502. A string containing the last-modified date. 
  503.  
  504.  
  505.  
  506. Applies to
  507.  
  508.  
  509.  
  510. document 
  511.  
  512. Examples
  513.  
  514.  
  515.  
  516. xxx Examples to be supplied. 
  517. ----------------------------------------------------------
  518.  
  519.  
  520. length property
  521.  
  522.  
  523.  
  524. For a history object, the length of the history list. For a string object, the integer length of the string. For a radioButton object, the number of radio buttons in the object. For an anchors, forms, frames, links, or options array, the number of elements in the array. 
  525.  
  526. For a null string, length is zero. 
  527.  
  528.  
  529.  
  530. Applies to
  531.  
  532. applet, history, radioButton, string objects anchors, forms, frames, links, options properties 
  533.  
  534. Examples
  535.  
  536.  
  537.  
  538. xxx Example with history to be supplied. 
  539.  
  540. If the string object mystring is "netscape"/TT>, then mystring.length returns the integer 8. 
  541.  
  542. If the current document contains five forms, then document.forms.length returns the integer 5. 
  543. ----------------------------------------------------------
  544.  
  545.  
  546. linkColor property
  547.  
  548.  
  549.  
  550. RGB value for color of hyperlinks, expressed as a hexadecimal triplet. 
  551.  
  552.  
  553.  
  554. Applies to
  555.  
  556.  
  557.  
  558. document 
  559.  
  560. Examples
  561.  
  562.  
  563.  
  564. xxx Examples to be supplied. 
  565. ----------------------------------------------------------
  566.